/**
 * @author free
 * @version 1.0
 * @since 2021/12/06 09:22
 */
package com.menhai.personmanagement.services;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.menhai.personmanagement.entity.co.TjInspectphysicalCo;
import com.menhai.personmanagement.mapper.TjQueryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class TjQueryService {
	
		@Autowired
	    private TjQueryMapper tjQueryMapper;

	  	
		/**
		 * 
		 * @param tjInspectphysical
		 * @return
		 */
		public IPage<List<Map<String,Object>>> getTjRecordListByConditionByPage(TjInspectphysicalCo tjInspectphysical){
	        Page<TjInspectphysicalCo> page = new Page<>(tjInspectphysical.getPageIndex(),tjInspectphysical.getPageSize());
	        return tjQueryMapper.getTjRecordListByConditionByPage(page,tjInspectphysical);
	    }

		public IPage<List<Map<String,Object>>> finishbodycheckup(TjInspectphysicalCo tjInspectphysicalCo) {
			Page<TjInspectphysicalCo> page = new Page<>(tjInspectphysicalCo.getPageIndex(), tjInspectphysicalCo.getPageSize());
			return tjQueryMapper.finishbodycheckup(page,tjInspectphysicalCo);
		}



		/**
		 * 
		 * @param tjInspectphysical
		 * @return
		 */
		public List<Map<String,Object>> getTjRecordListByCondition(TjInspectphysicalCo tjInspectphysical){
	        return tjQueryMapper.getTjRecordListByCondition(tjInspectphysical);
	    }
		
		
		/**
		 * 
		 * @param tjInspectphysical
		 * @return
		 */
		public List<Map<String,Object>> getTjRecordOneById(TjInspectphysicalCo tjInspectphysical) {
			return tjQueryMapper.getTjRecordOneById(tjInspectphysical);
		}
		
		/**
		 * 
		 * @param tjInspectphysical
		 * @return
		 */
		public IPage<List<Map<String,Object>>> getTjrcListByConditionByPage(TjInspectphysicalCo tjInspectphysical){
	        Page<TjInspectphysicalCo> page = new Page<>(tjInspectphysical.getPageIndex(),tjInspectphysical.getPageSize());
	        return tjQueryMapper.getTjrcListByConditionByPage(page,tjInspectphysical);
	    }
		
		public List<Map<String,Object>> getCun(String hosnum){
			List<Map<String,Object>> resultList=tjQueryMapper.getCun(hosnum);
			Map<String,Object> hj =new HashMap<String,Object>();
			hj.put("hosname", "合计");
			resultList.add(hj);
	        return resultList;
	    }
		
		public List tjjlgecunrenshu(){
	  		return tjQueryMapper.tjjlgecunrenshu();
		}
}
